{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "10be8ed8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd second.\n",
      "Not an odd second.\n",
      "Not an odd second.\n",
      "Not an odd second.\n",
      "Not an odd second.\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "import random\n",
    "import time\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39]\n",
    "\n",
    "for i in range(5):\n",
    "    right_this_second = datetime.today().second\n",
    "    if right_this_second in odds:\n",
    "        print(\"This second seems a little odd.\")\n",
    "    else:\n",
    "        print(\"Not an odd second.\")\n",
    "    wait_time = random.randint(1,5)\n",
    "    time.sleep(wait_time)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6ee0699d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd second.\n",
      "This second seems a little odd.\n",
      "Not an odd second.\n",
      "This second seems a little odd.\n",
      "This second seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "import random\n",
    "import time\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "for i in range(5):\n",
    "    right_this_second = datetime.today().second\n",
    "    if right_this_second in odds:\n",
    "        print(\"This second seems a little odd.\")\n",
    "    else:\n",
    "        print(\"Not an odd second.\")\n",
    "    wait_time = random.randint(1,5)\n",
    "    time.sleep(wait_time)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "57169052",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "descriptor 'time' of 'datetime.datetime' object needs an argument",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-3-1a794641b2e4>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: descriptor 'time' of 'datetime.datetime' object needs an argument"
     ]
    }
   ],
   "source": [
    "datetime.time()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "c5694490",
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "type object 'datetime.datetime' has no attribute 'datetime'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-4-a34b03d7d181>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdatetime\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m: type object 'datetime.datetime' has no attribute 'datetime'"
     ]
    }
   ],
   "source": [
    "datetime.datetime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "559fb9a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class datetime in module datetime:\n",
      "\n",
      "class datetime(date)\n",
      " |  datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n",
      " |  \n",
      " |  The year, month and day arguments are required. tzinfo may be None, or an\n",
      " |  instance of a tzinfo subclass. The remaining arguments may be ints.\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      datetime\n",
      " |      date\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  __add__(self, value, /)\n",
      " |      Return self+value.\n",
      " |  \n",
      " |  __eq__(self, value, /)\n",
      " |      Return self==value.\n",
      " |  \n",
      " |  __ge__(self, value, /)\n",
      " |      Return self>=value.\n",
      " |  \n",
      " |  __getattribute__(self, name, /)\n",
      " |      Return getattr(self, name).\n",
      " |  \n",
      " |  __gt__(self, value, /)\n",
      " |      Return self>value.\n",
      " |  \n",
      " |  __hash__(self, /)\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  __le__(self, value, /)\n",
      " |      Return self<=value.\n",
      " |  \n",
      " |  __lt__(self, value, /)\n",
      " |      Return self<value.\n",
      " |  \n",
      " |  __ne__(self, value, /)\n",
      " |      Return self!=value.\n",
      " |  \n",
      " |  __radd__(self, value, /)\n",
      " |      Return value+self.\n",
      " |  \n",
      " |  __reduce__(...)\n",
      " |      __reduce__() -> (cls, state)\n",
      " |  \n",
      " |  __reduce_ex__(...)\n",
      " |      __reduce_ex__(proto) -> (cls, state)\n",
      " |  \n",
      " |  __repr__(self, /)\n",
      " |      Return repr(self).\n",
      " |  \n",
      " |  __rsub__(self, value, /)\n",
      " |      Return value-self.\n",
      " |  \n",
      " |  __str__(self, /)\n",
      " |      Return str(self).\n",
      " |  \n",
      " |  __sub__(self, value, /)\n",
      " |      Return self-value.\n",
      " |  \n",
      " |  astimezone(...)\n",
      " |      tz -> convert to local time in new timezone tz\n",
      " |  \n",
      " |  ctime(...)\n",
      " |      Return ctime() style string.\n",
      " |  \n",
      " |  date(...)\n",
      " |      Return date object with same year, month and day.\n",
      " |  \n",
      " |  dst(...)\n",
      " |      Return self.tzinfo.dst(self).\n",
      " |  \n",
      " |  isoformat(...)\n",
      " |      [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n",
      " |      sep is used to separate the year from the time, and defaults to 'T'.\n",
      " |      The optional argument timespec specifies the number of additional terms\n",
      " |      of the time to include. Valid options are 'auto', 'hours', 'minutes',\n",
      " |      'seconds', 'milliseconds' and 'microseconds'.\n",
      " |  \n",
      " |  replace(...)\n",
      " |      Return datetime with new specified fields.\n",
      " |  \n",
      " |  time(...)\n",
      " |      Return time object with same time but with tzinfo=None.\n",
      " |  \n",
      " |  timestamp(...)\n",
      " |      Return POSIX timestamp as float.\n",
      " |  \n",
      " |  timetuple(...)\n",
      " |      Return time tuple, compatible with time.localtime().\n",
      " |  \n",
      " |  timetz(...)\n",
      " |      Return time object with same time and tzinfo.\n",
      " |  \n",
      " |  tzname(...)\n",
      " |      Return self.tzinfo.tzname(self).\n",
      " |  \n",
      " |  utcoffset(...)\n",
      " |      Return self.tzinfo.utcoffset(self).\n",
      " |  \n",
      " |  utctimetuple(...)\n",
      " |      Return UTC time tuple, compatible with time.localtime().\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods defined here:\n",
      " |  \n",
      " |  combine(...) from builtins.type\n",
      " |      date, time -> datetime with same date and time fields\n",
      " |  \n",
      " |  fromisoformat(...) from builtins.type\n",
      " |      string -> datetime from datetime.isoformat() output\n",
      " |  \n",
      " |  fromtimestamp(...) from builtins.type\n",
      " |      timestamp[, tz] -> tz's local time from POSIX timestamp.\n",
      " |  \n",
      " |  now(tz=None) from builtins.type\n",
      " |      Returns new datetime object representing current time local to tz.\n",
      " |      \n",
      " |        tz\n",
      " |          Timezone object.\n",
      " |      \n",
      " |      If no tz is specified, uses local timezone.\n",
      " |  \n",
      " |  strptime(...) from builtins.type\n",
      " |      string, format -> new datetime parsed from a string (like time.strptime()).\n",
      " |  \n",
      " |  utcfromtimestamp(...) from builtins.type\n",
      " |      Construct a naive UTC datetime from a POSIX timestamp.\n",
      " |  \n",
      " |  utcnow(...) from builtins.type\n",
      " |      Return a new datetime representing UTC day and time.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  __new__(*args, **kwargs) from builtins.type\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  fold\n",
      " |  \n",
      " |  hour\n",
      " |  \n",
      " |  microsecond\n",
      " |  \n",
      " |  minute\n",
      " |  \n",
      " |  second\n",
      " |  \n",
      " |  tzinfo\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)\n",
      " |  \n",
      " |  min = datetime.datetime(1, 1, 1, 0, 0)\n",
      " |  \n",
      " |  resolution = datetime.timedelta(microseconds=1)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from date:\n",
      " |  \n",
      " |  __format__(...)\n",
      " |      Formats self with strftime.\n",
      " |  \n",
      " |  isocalendar(...)\n",
      " |      Return a 3-tuple containing ISO year, week number, and weekday.\n",
      " |  \n",
      " |  isoweekday(...)\n",
      " |      Return the day of the week represented by the date.\n",
      " |      Monday == 1 ... Sunday == 7\n",
      " |  \n",
      " |  strftime(...)\n",
      " |      format -> strftime() style string.\n",
      " |  \n",
      " |  toordinal(...)\n",
      " |      Return proleptic Gregorian ordinal.  January 1 of year 1 is day 1.\n",
      " |  \n",
      " |  weekday(...)\n",
      " |      Return the day of the week represented by the date.\n",
      " |      Monday == 0 ... Sunday == 6\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from date:\n",
      " |  \n",
      " |  fromisocalendar(...) from builtins.type\n",
      " |      int, int, int -> Construct a date from the ISO year, week number and weekday.\n",
      " |      \n",
      " |      This is the inverse of the date.isocalendar() function\n",
      " |  \n",
      " |  fromordinal(...) from builtins.type\n",
      " |      int -> date corresponding to a proleptic Gregorian ordinal.\n",
      " |  \n",
      " |  today(...) from builtins.type\n",
      " |      Current date or datetime:  same as self.__class__.fromtimestamp(time.time()).\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from date:\n",
      " |  \n",
      " |  day\n",
      " |  \n",
      " |  month\n",
      " |  \n",
      " |  year\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(datetime)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f3a6b1c9",
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "type object 'datetime.datetime' has no attribute 'datetime'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-6-f944e2f37099>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdatetime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtoday\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m: type object 'datetime.datetime' has no attribute 'datetime'"
     ]
    }
   ],
   "source": [
    "datetime.datetime.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "a5549b82",
   "metadata": {},
   "outputs": [
    {
     "ename": "IndentationError",
     "evalue": "expected an indented block (<ipython-input-10-70dd528f0ae3>, line 3)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-10-70dd528f0ae3>\"\u001b[1;36m, line \u001b[1;32m3\u001b[0m\n\u001b[1;33m    print(\"Python\")\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m expected an indented block\n"
     ]
    }
   ],
   "source": [
    "if today == \"Thursday\":\n",
    "    if time == \"9:35\":\n",
    "    print(\"Python\")\n",
    "elif today == \"Saturday\":\n",
    "    if condition == \"Association\":\n",
    "        print(\"Work!then rest.\")\n",
    "    else:\n",
    "        print(\"Rest.\")\n",
    "else:\n",
    "    print(\"Study,study,study.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3df00c66",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
